package chapter_2;

import java.util.Scanner;

public class Test18 {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        int count = 0;
        while(true){
            if(count == 3){
                System.out.println("账号绑定，退出系统");
                break;
            }
            System.out.println("请输入你的密码：");
            int password = scanner.nextInt();
            if(password == 520){
                System.out.println("密码正确，欢迎进入系统");
                break;
            }else{
                System.out.println("密码错误");
                count++;
            }
        }
    }
}
